#pragma once

#include "cartographer/rcm/imu/common.h"

namespace cartographer
{
    class ImuMiddleCalculator
    {
    public:
        ImuMiddleCalculator(const common::Time &time_start, const common::Time &time_end, int dataSize);

        int Calculate(const ImuDataAlias &imuCurr, const ImuDataAlias &imuNext, int idx);

        float tstep = 0.0;
        Eigen::Vector3d acc;
        Eigen::Vector3d angular;
        common::Time time_end;
        common::Time time_start;
        int data_size = 0;
    };

} // namespace cartographer